using System;
using System.Windows.Forms;

using FreeFlow.Administration;

namespace FreeFlowAdministrator
{
	/// <summary>
	/// Summary description for ColumnAdaptor.
	/// </summary>
	public class ColumnAdaptor : Adaptor
	{
    private Column column;
    public ColumnAdaptor(Column column)
    {
      this.column = column;
    }

    public override string Text
    {
      get
      {
        return column.Name; 
      }
    }

    public override object Object
    {
      get
      {
        return column;
      }
    }

    public override int ImageIndex
    {
      get
      {
        return 36;
      }
    }

    public override Control GetRenderer()
    {
      ColumnControl control = new ColumnControl();
      control.LoadColumn(column);
      control.ItemDeleted += new EventHandler(TriggerItemDeleted);
      return control;
    }
	}
}
